<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="author" content="wangbo">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>window</title>
</head>

<body>

  <script>
    // 打开页面的url(可以不写),"窗口名"(可以不写),"窗口的属性,隔开"
    // window.open("","","width=400px,height=400px")
    // win 代表打开的窗口
    var win = window.open("", "青芒", "width=400px,height=400px,left=200px,top=200px")
    // 滚动条移动
    window.scrollTo(100, 500);
    // win 小窗口的实例对象
    var win = window.open("", "青芒", "width=400px,height=400px")
    // 移动窗口left top
    win.moveTo(100, 200)
    console.log(win)
    var is = win.confirm("需要删除不??")
    console.log(is)

    var is = window.confirm("是否关闭")
    console.log(is)
    if (is) {
      // 关闭当前窗口
      window.close()
    }
    win.document.write(" <div>喜欢js</div>")
    // left屏幕左边 top屏幕顶部

    // toolbar工具栏 默认yes location 访问地址,状态栏,menubar菜单栏
    // toolbar=no,location=no,directories=no,status=no,menubar=no
  </script>
</body>

</html>